//
//  FCAddCoinsCell.m
//  FundChain
//
//  Created by 肖浩然的mac on 2018/2/27.
//  Copyright © 2018年 RUIXIN. All rights reserved.
//

#import "FCAddCoinsCell.h"

@implementation FCAddCoinsCell

-(instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        
        [self setupUI];
    }
    return self;
}
-(void)setupUI{
    
    //bgView
    self.bgView = [UIView new];
    [self addSubview:self.bgView];
    [self.bgView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.mas_equalTo(0);
    }];
    self.bgView.layer.cornerRadius = 5;
    self.bgView.layer.masksToBounds = YES;
    self.bgView.backgroundColor = HEXCOLOR(0xf7fbff);
    //icon
    self.iconImageView = [UIImageView new];
    [self.bgView addSubview:self.iconImageView];
    [self.iconImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(40*KScreenHeightScale1334);
        make.centerX.mas_equalTo(0);
        make.size.mas_equalTo(CGSizeMake(50, 50));
    }];
//    self.iconImageView.image = [UIImage imageNamed:@"btc_50pt"];
    //昵称
    self.nickNameLabel = [UILabel new];
    [self.bgView addSubview:self.nickNameLabel];
    [self.nickNameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.mas_equalTo(0);
        make.top.mas_equalTo(self.iconImageView.mas_bottom).offset(40*KScreenHeightScale1334);
        
        
    }];
    self.nickNameLabel.text = @"Bitcion";
    self.nickNameLabel.font = Kfont(28);
    self.nickNameLabel.textColor = kDarkBlackColor;
//    self.nickNameLabel.numberOfLines = 2;
    //等值多少
    self.distanceLabel = [UILabel new];
    [self.bgView addSubview:self.distanceLabel];
    [self.distanceLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.mas_equalTo(0);
        make.top.mas_equalTo(self.nickNameLabel.mas_bottom).offset(20*KScreenHeightScale1334);
        
    }];
//    self.distanceLabel.text =@"≈6,358.189USD";
    self.distanceLabel.font = Kfont(28);
    self.distanceLabel.textColor = kOrderColor;
    
    //右上角选中图标
    self.imageView = [UIButton new];
    [self.bgView addSubview:self.imageView];
    [self.imageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.mas_equalTo(0);
        make.top.mas_equalTo(0);
        make.size.mas_equalTo(CGSizeMake(32, 32));
    }];
//    self.imageView.hidden = YES;
//    [self.imageView  setImage:[UIImage imageNamed:@""] forState:UIControlStateNormal];
    [self.imageView  setImage:[UIImage imageNamed:@"chosen_coin"] forState:UIControlStateNormal];
    
    
}

//-(void)setSelected:(BOOL)selected{
//    [super setSelected:selected];
//    self.isSelect = self.selected;
//    self.imageView.selected = self.isSelect;
//}
@end
